package com.pitop.base;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Created by jiyan on 2018/11/26.
 *
 *配合login.config文件使用， 获取login.config文件中的数据
 */
@Configuration
@ConfigurationProperties(prefix = "login", ignoreUnknownFields = false)
@PropertySource("classpath:login.properties")
@Data
@Component
public class LoginConfig {

    //用户名
    @Value("${com.pitop.support.username}")
    public String username;

    //密码
    @Value("${com.pitop.support.password}")
    public String password;


}
